package com.cjxt.ams.domain;


import com.baomidou.mybatisplus.annotation.FieldFill;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;

/**
 * @author fangzhiyu
 * @version V1.0
 * @Description: 部门实体类
 * @className: Dept
 * @date 2021/11/23 11:15
 * @company:华勤技术股份有限公司
 * @copyright: Copyright (c) 2021
 */

@Data
@ToString
@TableName("sys_dept")
public class Dept implements Serializable {


    /**
     * 主键 部门id
     */
    @TableId(value = "id")
    private Integer deptId;

    /**
     * 父部门id，根部门的父id为0
     */
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * 部门名称
     */
   @TableField(value = "name")
    private String name;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 修改人
     */
    @TableField(value = "update_by")
    private String updateBy;

    /**
     * 父菜单名称
     */
    @TableField(exist=false)
    private String parentName;


}
